<?php 
require('lib/smarty/Smarty.class.php');

class Template
{
	private $smarty;

	function __construct()
	{
		// put full path to Smarty.class.php
		$this->smarty = new Smarty();

		if (!is_writable('./templates_c'))
		{
			die('./templates_c is not writable by the webserver.');
		}


		$this->smarty->template_dir = './views';
	}

	public function __get($varName)
	{
	}

	public function __set($varName,$varValue)
	{
		$this->smarty->assign($varName, $varValue);
	}



	function render($templatefile)
	{
		$this->smarty->display($templatefile);
	}
}
?>
